#ifndef RECEIVEPACKTHREAD_H
#define RECEIVEPACKTHREAD_H
#include <QThread>
#include <QSerialPort>

class ReceivePackThread : public QThread
{
    Q_OBJECT
public:
    ReceivePackThread(QSerialPort *port);

private:
    void run() override;
    bool parsePack(unsigned char pack[],int size,char *cmd,char *param,int *data);

    QSerialPort *m_port = NULL;

signals:
    void receivePackData(char cmd,char param,int data);

};

#endif // RECEIVEPACKTHREAD_H
